package com.lpssfxy.datainit.utils

object AppUtils {

  // 以Windows下为例，需替换成自己的路径，linux下为 /YOUR_PATH/resources/products.csv
  val PRODUCT_DATA_PATH = "../../../../data/products.csv"
  val RATING_DATA_PATH = "../../../../ratings.csv"

  // 对应MongoDB下的Product表
  val MONGODB_PRODUCT_COLLECTION = "product"
  // 对应MongoDB下的Rating表
  val MONGODB_RATING_COLLECTION = "rating"

  val configMap = Map(
    "spark.cores" -> "local[*]",
    "mongo.uri" -> "mongodb://fooadmin:123456@s3:27017/bigdata",
    "mongo.db" -> "bigdata"
  )

  def getSparkCores: String = configMap("spark.cores")
  def getMongoUri: String = configMap("mongo.uri")
  def getMongoDb: String = configMap("mongo.db")

}
